--编写者：alt
--功能介绍：解除永恒新界位移限制
--使用方法：直接粘贴 修改herta为玩家对应tag

-- 新
local state, transformlimit = pcall(require, "components/transformlimit")
if state and transformlimit and transformlimit.UpdatePosition then
    local _UpdatePosition = transformlimit.UpdatePosition
    function transformlimit:UpdatePosition(area, ...)
        if self.inst:HasTag("herta") then
            return
        end
        return _UpdatePosition(self, area, ...)
    end
end
-- 第二种方法 "wilson"换成角色prefab
AddPrefabPostInit("wilson", function(inst)
    local _PushEvent = inst.PushEvent
    inst.PushEvent = function(self, event, data, ...)
        if event == "changearea" then
            local tags = data and data.tags
            if tags and table.contains(tags, "notele") then
                return
            end
        end
        return _PushEvent(self, event, data, ...)
    end
end)
